package com.lq.client.service;

import com.lq.client.dto.CartDTO;
import com.lq.client.entity.ProductInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface ProductService {

    ProductInfo findOne(String productId);

    List<ProductInfo> findUpAll();

    Page<ProductInfo> findAll(Pageable pageable);

    ProductInfo save(ProductInfo productInfo);
    ProductInfo saveAndFlush(ProductInfo productInfo);


   public void updataState(Integer productStatus, String productId);

    //TODO
    // +- 库存
    void  increaseStock(List<CartDTO> cartDTOList);

    void  decreaseStock(List<CartDTO> cartDTOList);

}
